// 统一注册Icon图标
import * as ElIconModules from "@element-plus/icons-vue";
import {App} from "vue";
import {getIconFonts, getIconifyIcons} from "/@/utils/icon/icon-required";
export const iconList = [] as string[];

export function autoImportIcon(app: App<Element>){

    /*element plus图标*/
    let  iconName = '' ;
    for (iconName in ElIconModules) {
        if (Reflect.has(ElIconModules, iconName)) {
            // @ts-ignore
            const item = ElIconModules[iconName]
            app.component(iconName, item)
            iconList.push(iconName)
        }
    }
    //iconify 图标
    for (const iconName in getIconifyIcons) {
        iconList.push(iconName)
    }
    //iconfont图标
    for (const iconName in getIconFonts()){
        iconList.push(iconName)
    }
}





